3.7 \(\int \frac{(d+c d x) (a+b \tanh ^{-1}(c x))}{x^3} \, dx\)

Optimal. Leaf size=56 \[ -\frac{d (c x+1)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 x^2}+b c^2 d \log (x)-b c^2 d \log (1-c x)-\frac{b c d}{2 x} \]

[Out]

-(b*c*d)/(2*x) - (d*(1 + c*x)^2*(a + b*ArcTanh[c*x]))/(2*x^2) + b*c^2*d*Log[x] - b*c^2*d*Log[1 - c*x]

________________________________________________________________________________________

Rubi [A]  time = 0.0540103, antiderivative size = 56, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {37, 5936, 12, 77} \[ -\frac{d (c x+1)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 x^2}+b c^2 d \log (x)-b c^2 d \log (1-c x)-\frac{b c d}{2 x} \]

Antiderivative was successfully verified.

[In]

Int[((d + c*d*x)*(a + b*ArcTanh[c*x]))/x^3,x]

[Out]

-(b*c*d)/(2*x) - (d*(1 + c*x)^2*(a + b*ArcTanh[c*x]))/(2*x^2) + b*c^2*d*Log[x] - b*c^2*d*Log[1 - c*x]

Rule 37

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^(n +
1))/((b*c - a*d)*(m + 1)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[m + n + 2, 0] && NeQ
[m, -1]

Rule 5936

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))*((f_.)*(x_))^(m_.)*((d_.) + (e_.)*(x_))^(q_.), x_Symbol] :> With[{u =
IntHide[(f*x)^m*(d + e*x)^q, x]}, Dist[a + b*ArcTanh[c*x], u, x] - Dist[b*c, Int[SimplifyIntegrand[u/(1 - c^2*
x^2), x], x], x]] /; FreeQ[{a, b, c, d, e, f, q}, x] && NeQ[q, -1] && IntegerQ[2*m] && ((IGtQ[m, 0] && IGtQ[q,
 0]) || (ILtQ[m + q + 1, 0] && LtQ[m*q, 0]))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rubi steps

\begin{align*} \int \frac{(d+c d x) \left (a+b \tanh ^{-1}(c x)\right )}{x^3} \, dx &=-\frac{d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 x^2}-(b c) \int \frac{d (-1-c x)}{2 x^2 (1-c x)} \, dx\\ &=-\frac{d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 x^2}-\frac{1}{2} (b c d) \int \frac{-1-c x}{x^2 (1-c x)} \, dx\\ &=-\frac{d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 x^2}-\frac{1}{2} (b c d) \int \left (-\frac{1}{x^2}-\frac{2 c}{x}+\frac{2 c^2}{-1+c x}\right ) \, dx\\ &=-\frac{b c d}{2 x}-\frac{d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 x^2}+b c^2 d \log (x)-b c^2 d \log (1-c x)\\ \end{align*}

Mathematica [A]  time = 0.0603059, size = 76, normalized size = 1.36 \[ -\frac{d \left (4 a c x+2 a-4 b c^2 x^2 \log (x)+3 b c^2 x^2 \log (1-c x)+b c^2 x^2 \log (c x+1)+2 b c x+2 (2 b c x+b) \tanh ^{-1}(c x)\right )}{4 x^2} \]

Antiderivative was successfully verified.

[In]

Integrate[((d + c*d*x)*(a + b*ArcTanh[c*x]))/x^3,x]

[Out]

-(d*(2*a + 4*a*c*x + 2*b*c*x + 2*(b + 2*b*c*x)*ArcTanh[c*x] - 4*b*c^2*x^2*Log[x] + 3*b*c^2*x^2*Log[1 - c*x] +
b*c^2*x^2*Log[1 + c*x]))/(4*x^2)

________________________________________________________________________________________

Maple [A]  time = 0.039, size = 84, normalized size = 1.5 \begin{align*} -{\frac{cda}{x}}-{\frac{da}{2\,{x}^{2}}}-{\frac{cdb{\it Artanh} \left ( cx \right ) }{x}}-{\frac{db{\it Artanh} \left ( cx \right ) }{2\,{x}^{2}}}-{\frac{3\,{c}^{2}db\ln \left ( cx-1 \right ) }{4}}+{c}^{2}db\ln \left ( cx \right ) -{\frac{cdb}{2\,x}}-{\frac{{c}^{2}db\ln \left ( cx+1 \right ) }{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*d*x+d)*(a+b*arctanh(c*x))/x^3,x)

[Out]

-c*d*a/x-1/2*d*a/x^2-c*d*b*arctanh(c*x)/x-1/2*d*b*arctanh(c*x)/x^2-3/4*c^2*d*b*ln(c*x-1)+c^2*d*b*ln(c*x)-1/2*b
*c*d/x-1/4*c^2*d*b*ln(c*x+1)

________________________________________________________________________________________

Maxima [A]  time = 0.957128, size = 120, normalized size = 2.14 \begin{align*} -\frac{1}{2} \,{\left (c{\left (\log \left (c^{2} x^{2} - 1\right ) - \log \left (x^{2}\right )\right )} + \frac{2 \, \operatorname{artanh}\left (c x\right )}{x}\right )} b c d + \frac{1}{4} \,{\left ({\left (c \log \left (c x + 1\right ) - c \log \left (c x - 1\right ) - \frac{2}{x}\right )} c - \frac{2 \, \operatorname{artanh}\left (c x\right )}{x^{2}}\right )} b d - \frac{a c d}{x} - \frac{a d}{2 \, x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*d*x+d)*(a+b*arctanh(c*x))/x^3,x, algorithm="maxima")

[Out]

-1/2*(c*(log(c^2*x^2 - 1) - log(x^2)) + 2*arctanh(c*x)/x)*b*c*d + 1/4*((c*log(c*x + 1) - c*log(c*x - 1) - 2/x)
*c - 2*arctanh(c*x)/x^2)*b*d - a*c*d/x - 1/2*a*d/x^2

________________________________________________________________________________________

Fricas [A]  time = 2.03806, size = 220, normalized size = 3.93 \begin{align*} -\frac{b c^{2} d x^{2} \log \left (c x + 1\right ) + 3 \, b c^{2} d x^{2} \log \left (c x - 1\right ) - 4 \, b c^{2} d x^{2} \log \left (x\right ) + 2 \,{\left (2 \, a + b\right )} c d x + 2 \, a d +{\left (2 \, b c d x + b d\right )} \log \left (-\frac{c x + 1}{c x - 1}\right )}{4 \, x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*d*x+d)*(a+b*arctanh(c*x))/x^3,x, algorithm="fricas")

[Out]

-1/4*(b*c^2*d*x^2*log(c*x + 1) + 3*b*c^2*d*x^2*log(c*x - 1) - 4*b*c^2*d*x^2*log(x) + 2*(2*a + b)*c*d*x + 2*a*d
 + (2*b*c*d*x + b*d)*log(-(c*x + 1)/(c*x - 1)))/x^2

________________________________________________________________________________________

Sympy [A]  time = 4.1712, size = 95, normalized size = 1.7 \begin{align*} \begin{cases} - \frac{a c d}{x} - \frac{a d}{2 x^{2}} + b c^{2} d \log{\left (x \right )} - b c^{2} d \log{\left (x - \frac{1}{c} \right )} - \frac{b c^{2} d \operatorname{atanh}{\left (c x \right )}}{2} - \frac{b c d \operatorname{atanh}{\left (c x \right )}}{x} - \frac{b c d}{2 x} - \frac{b d \operatorname{atanh}{\left (c x \right )}}{2 x^{2}} & \text{for}\: c \neq 0 \\- \frac{a d}{2 x^{2}} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*d*x+d)*(a+b*atanh(c*x))/x**3,x)

[Out]

Piecewise((-a*c*d/x - a*d/(2*x**2) + b*c**2*d*log(x) - b*c**2*d*log(x - 1/c) - b*c**2*d*atanh(c*x)/2 - b*c*d*a
tanh(c*x)/x - b*c*d/(2*x) - b*d*atanh(c*x)/(2*x**2), Ne(c, 0)), (-a*d/(2*x**2), True))

________________________________________________________________________________________

Giac [A]  time = 1.1892, size = 115, normalized size = 2.05 \begin{align*} -\frac{1}{4} \, b c^{2} d \log \left (c x + 1\right ) - \frac{3}{4} \, b c^{2} d \log \left (c x - 1\right ) + b c^{2} d \log \left (x\right ) - \frac{{\left (2 \, b c d x + b d\right )} \log \left (-\frac{c x + 1}{c x - 1}\right )}{4 \, x^{2}} - \frac{2 \, a c d x + b c d x + a d}{2 \, x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*d*x+d)*(a+b*arctanh(c*x))/x^3,x, algorithm="giac")

[Out]

-1/4*b*c^2*d*log(c*x + 1) - 3/4*b*c^2*d*log(c*x - 1) + b*c^2*d*log(x) - 1/4*(2*b*c*d*x + b*d)*log(-(c*x + 1)/(
c*x - 1))/x^2 - 1/2*(2*a*c*d*x + b*c*d*x + a*d)/x^2